<?php
// +----------------------------------------------------------------------
// | FJP203 [ HERE"S LOOKING AT YOU,KID!]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2014 http://fjp203 All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: fjp203 <fjp203@163.com>
// +----------------------------------------------------------------------
// | Function:2016-7-12 公告数据处理控制器
// +----------------------------------------------------------------------
namespace Home\Controller;
use Think\Controller;
header("Content-Type:text/html;charset=utf-8");
class AnnController extends Controller {
    public function index(){
        $this->display();
    }
	public function fjp203(){
		$this->show("<h1>坚持就是胜利</div>");
	}
    public function test(){
	$dataList=allZc();
//		var_dump($dataList);
		$zclist = M("zclist"); // 实例化User对象
	$zclist->where('1')->delete(); 
$zclist->addAll($dataList);
// 	$data=$zclist->select();
// 		var_dump($data);
// 		echo "<br/><br/><br/><br/>";
// 		var_dump($dataList);
		
    }

	public function fjp(){
		$id="NTAwMzMx";
		var_dump(parserHtml($id));
	}
	/**
* @function:整车数据更新
* @date: 2016-7-12
* @author: 范建鹏
* @return:
* @param: string $match_result[0]
*/
	public function zcUpdate(){
			$listNew=allZc();
			$zclistnew = M("zclistcache");//建立一个缓存表
			$zclistnew->where('1')->delete();
			$zclistnew->addAll($listNew);
// 			$listnew=$zclistnew->field('id',true)->select();
			$zclist = M("zclist"); // 实例化zclist对象
// 			$listOld=$zclist->field('id',true)->select();
			
			$dddd=$zclist->join('LEFT JOIN think_zclistcache ON think_zclist.zj != think_zclistcache.zj')->select();
// 			数据更新
var_dump($dddd);

// 			$dffList=array_diff_assoc2_deep($listNew,$listOld);
// 		 var_dump($listOld);
// // 数据差异
// $d=array();
// //差异行号
// $n=array();
// foreach ($dffList as $key=>$value){
// 	if(count($value)!=0){
// 		$d[]=$value;
// 		$n[]['key']=$key;
// 	}else{
// // 		echo "没有";
// 	}
// }
// var_dump($d);
// var_dump($n);

// 			牺牲性能，减少复杂逻辑：建一个缓存表，量表对比进行更新


	}
}